﻿@model IEnumerable<wh40klbWeb.Models.InfantryViewModel>
@{
    ViewBag.Title = "ListAll";
}
<h2>
    ListAll</h2>
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            Army
        </th>
        <th>
            Squad Type
        </th>
        <th>
            WeaponSkill
        </th>
        <th>
            BallisticSkill
        </th>
        <th>
            Strengh
        </th>
        <th>
            Thoughness
        </th>
        <th>
            Wounds
        </th>
        <th>
            Initiative
        </th>
        <th>
            Attack
        </th>
        <th>
            Leadership
        </th>
        <th>
            ArmorSave
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr class=" @item.Availible "  >
            <td>
                @Html.ActionLink(item.Name, "Details", new { id = item.Id })
            </td>
            <td>
                @Html.ActionLink(item.Army.Name, "Details", "Army", new { id = item.Army.Id }, null)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.SquadType)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.WeaponSkill)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.BallisticSkill)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Strengh)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Thoughness)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Wounds)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Initiative)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Attack)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Leadership)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ArmorSave)
            </td>
        </tr>
    }
</table>
